import 'dart:convert';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';

/// 帮助工具类
class Help {
  /// 缓存本地图片
  static Future<void> precacheNetworkImage(
    String url, [
    BuildContext? context,
  ]) async {
    if (url.isEmpty) return;
    // debugPrint('precacheNetworkImage $url');
    // await precacheImage(
    //     ExtendedNetworkImageProvider(url), context ?? Get.context!);
  }

  /// 缓存本地图片
  static Future<void> precacheAssetImage(
    String assetName, [
    BuildContext? context,
  ]) async {
    if (assetName.isEmpty) return;
    // debugPrint('precacheAssetImage $assetName');
    // await precacheImage(
    //     ExtendedAssetImageProvider(assetName), context ?? Get.context!);
  }
}
